package com.wwwarehouse.taskcenter.bean.job_point;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * author ：minifly
 * date: 2017/10/28
 * time: 14:38
 * desc:
 */
public class AddJobPointStep5HavedUnitResponseBean implements Parcelable {

    /**
     * jbUnitFactors : [{"memberName":"人","memberNum":1,"memberType":"PERSON","memberUkid":1000001,"menberNumUnit":"个","unitFactorUkid":12119000000004000}]
     * jbUnitName : 作业单元1
     * jbUnitUkid : 12119100000006000
     */

    private String jbUnitName;
    private String jbUnitUkid;
    private boolean selected;

    public String getJbUnitUkid() {
        return jbUnitUkid;
    }

    public void setJbUnitUkid(String jbUnitUkid) {
        this.jbUnitUkid = jbUnitUkid;
    }

    public boolean isSelected() {
        return selected;
    }

    public void setSelected(boolean selected) {
        this.selected = selected;
    }

    private List<JbUnitFactorsBean> jbUnitFactors;

    public String getJbUnitName() {
        return jbUnitName;
    }

    public void setJbUnitName(String jbUnitName) {
        this.jbUnitName = jbUnitName;
    }


    public List<JbUnitFactorsBean> getJbUnitFactors() {
        return jbUnitFactors;
    }

    public void setJbUnitFactors(List<JbUnitFactorsBean> jbUnitFactors) {
        this.jbUnitFactors = jbUnitFactors;
    }

    public static class JbUnitFactorsBean implements Parcelable {
        /**
         * memberName : 人
         * memberNum : 1
         * memberType : PERSON
         * memberUkid : 1000001
         * menberNumUnit : 个
         * unitFactorUkid : 12119000000004000
         */

        private String memberName;
        private String memberNum;
        private String memberType;
        private String memberUkid;
        private String menberNumUnit;
        private String unitFactorUkid;

        public String getMemberName() {
            return memberName;
        }

        public void setMemberName(String memberName) {
            this.memberName = memberName;
        }

        public String getMemberNum() {
            return memberNum;
        }

        public void setMemberNum(String memberNum) {
            this.memberNum = memberNum;
        }

        public String getMemberType() {
            return memberType;
        }

        public void setMemberType(String memberType) {
            this.memberType = memberType;
        }

        public String getMemberUkid() {
            return memberUkid;
        }

        public void setMemberUkid(String memberUkid) {
            this.memberUkid = memberUkid;
        }

        public String getMenberNumUnit() {
            return menberNumUnit;
        }

        public void setMenberNumUnit(String menberNumUnit) {
            this.menberNumUnit = menberNumUnit;
        }

        public String getUnitFactorUkid() {
            return unitFactorUkid;
        }

        public void setUnitFactorUkid(String unitFactorUkid) {
            this.unitFactorUkid = unitFactorUkid;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.memberName);
            dest.writeString(this.memberNum);
            dest.writeString(this.memberType);
            dest.writeString(this.memberUkid);
            dest.writeString(this.menberNumUnit);
            dest.writeString(this.unitFactorUkid);
        }

        public JbUnitFactorsBean() {
        }

        protected JbUnitFactorsBean(Parcel in) {
            this.memberName = in.readString();
            this.memberNum = in.readString();
            this.memberType = in.readString();
            this.memberUkid = in.readString();
            this.menberNumUnit = in.readString();
            this.unitFactorUkid = in.readString();
        }

        public static final Parcelable.Creator<JbUnitFactorsBean> CREATOR = new Parcelable.Creator<JbUnitFactorsBean>() {
            @Override
            public JbUnitFactorsBean createFromParcel(Parcel source) {
                return new JbUnitFactorsBean(source);
            }

            @Override
            public JbUnitFactorsBean[] newArray(int size) {
                return new JbUnitFactorsBean[size];
            }
        };
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.jbUnitName);
        dest.writeString(this.jbUnitUkid);
        dest.writeByte(this.selected ? (byte) 1 : (byte) 0);
        dest.writeTypedList(this.jbUnitFactors);
    }

    public AddJobPointStep5HavedUnitResponseBean() {
    }

    protected AddJobPointStep5HavedUnitResponseBean(Parcel in) {
        this.jbUnitName = in.readString();
        this.jbUnitUkid = in.readString();
        this.selected = in.readByte() != 0;
        this.jbUnitFactors = in.createTypedArrayList(JbUnitFactorsBean.CREATOR);
    }

    public static final Parcelable.Creator<AddJobPointStep5HavedUnitResponseBean> CREATOR = new Parcelable.Creator<AddJobPointStep5HavedUnitResponseBean>() {
        @Override
        public AddJobPointStep5HavedUnitResponseBean createFromParcel(Parcel source) {
            return new AddJobPointStep5HavedUnitResponseBean(source);
        }

        @Override
        public AddJobPointStep5HavedUnitResponseBean[] newArray(int size) {
            return new AddJobPointStep5HavedUnitResponseBean[size];
        }
    };
}
